home *** CD-ROM | disk | FTP | other *** search
/ BCI NET / BCI NET Dec 94.iso / archives / utilities / guide / ami2guide.lha / aminet2guide / a2g.rexx < prev    next >
Encoding:
OS/2 REXX Batch file  |  1994-10-08  |  2.6 KB  |  74 lines

  1. /************/
  2. /* a2g.rexx */
  3. /************/
  4.  
  5. /*******************************************************************/
  6. /*                                                                 */
  7. /* Author: T. B. Kreuzer                                           */
  8. /*                                                                 */
  9. /* Description: This ARexx script will take an Aminet "INDEX"      */
  10. /*              or "RECENT" output file (saved from Term),         */
  11. /*              convert it to an AmigaGuide file, and execute      */
  12. /*              AmigaGuide so that the AmigaGuide display is       */
  13. /*              opened on the Term screen.                         */
  14. /*                                                                 */
  15. /* Pre-requisites: 1) ARexx must be active                         */
  16. /*                 2) Term must be active                          */
  17. /*                 3) Term "buffer" containing "INDEX" or "RECENT" */
  18. /*                    output from Aminet has been saved to         */
  19. /*                    "RAM:Aminet"                                 */
  20. /*                 4) "Aminet2Guide" program is in the C:          */
  21. /*                    directory                                    */
  22. /*                 5) "AmigaGuide" program is in the SYS:Utilities */
  23. /*                    directory                                    */
  24. /*                                                                 */
  25. /* WARNING: This script should ONLY be run from OUTSIDE the Term   */
  26. /*          program (i.e., from the CLI/Shell).  For some unknown  */
  27. /*          reason, running this from within Term causes the Term  */
  28. /*          screen to go blank!                                    */
  29. /*                                                                 */
  30. /*******************************************************************/
  31.  
  32.  
  33. /* Tell Term to Shanghai any new windows so that */
  34. /* they open on the Term screen                  */
  35.  
  36. OPTIONS RESULTS
  37.  
  38. ADDRESS term
  39.  
  40. GETATTR screenprefs.shanghaiwindows
  41.  
  42. IF result = OFF THEN 'SETATTR screenprefs shanghaiwindows ON'
  43.  
  44. /* Delete any old AmigaGuide output from a previous run */
  45.  
  46. ADDRESS command
  47.  
  48. 'C:Delete >NIL: RAM:Aminet.guide'
  49.  
  50. /* Convert "RAM:Aminet output to AmigaGuide format */
  51.  
  52. 'C:Aminet2Guide RAM:Aminet RAM:Aminet.guide'
  53.  
  54. /* Wait until output AmigaGuide file has been created */
  55.  
  56. loop:
  57. 'C:List >NIL: RAM:Aminet.guide'
  58.  
  59. if RC ~= 0 THEN SIGNAL loop
  60.  
  61. /* Invoke AmigaGuide on the output AmigaGuide file */
  62.  
  63. 'SYS:Utilities/AmigaGuide RAM:Aminet.guide'
  64.  
  65. /* Tell Term to stop Shanghai'ing windows */
  66.  
  67. ADDRESS term
  68.  
  69. SETATTR screenprefs shanghaiwindows OFF
  70.  
  71. /* End of script */
  72.  
  73. EXIT
  74.